package com.akaovi.phone;

/**
 * @author akaovi
 * @version 1.0
 * @description 手机
 * @date 2022/10/17 14:44
 * @since 2022/10/17 14:44
 */
public class Phone implements PhoneFunc {
    private String brand;
    private String model;
    private String OS;
    private Double price;
    private Integer RAM;

    public Phone() {
    }

    public Phone(String brand, String model, String OS, Double price, Integer RAM) {
        this.brand = brand;
        this.model = model;
        this.OS = OS;
        this.price = price;
        this.RAM = RAM;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getOS() {
        return OS;
    }

    public void setOS(String OS) {
        this.OS = OS;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getRAM() {
        return RAM;
    }

    public void setRAM(Integer RAM) {
        this.RAM = RAM;
    }

    @Override
    public String toString() {
        return "Phone{" +
                "品牌='" + brand + '\'' +
                ", 型号='" + model + '\'' +
                ", 操作系统='" + OS + '\'' +
                ", 价格=" + price +
                ", 内存=" + RAM +
                '}';
    }

    @Override
    public void call(String contact) {
        System.out.println("使用自动拨号功能：");
        System.out.printf("拨打%s的电话。\n", contact);
    }

    @Override
    public void playGame(String gameName) {
        System.out.printf("%s…游戏开始。\n", gameName);
    }

    @Override
    public void playMusic(String musicName) {
        System.out.printf("歌曲\"%s\" begin play\n", musicName);
    }
}
